--select * from tb_DailyReportTag where tag in ('A131','A121','A132','A129')
--select * from tb_DailyReportTag where tag in ('A231','A221','A232','A229');

alter table tb_DailyReportTag add backupFun nvarchar(500);
go
update tb_DailyReportTag set backupFun='funMonth(A130)+A130' where tag='A131';
update tb_DailyReportTag set backupFun='A106*funPara(mileage_1)+A131' where tag='A121';

update tb_DailyReportTag set backupFun='funYear(A130)+A130' where tag='A132';
update tb_DailyReportTag set backupFun='A125*funPara(mileage_1)+A132' where tag='A129';

update tb_DailyReportTag set backupFun='funMonth(A230)+A230' where tag='A231';
update tb_DailyReportTag set backupFun='A206*funPara(mileage_2)+A231' where tag='A221';

update tb_DailyReportTag set backupFun='funYear(A230)+A230' where tag='A232';
update tb_DailyReportTag set backupFun='A225*funPara(mileage_2)+A232' where tag='A229';

update tb_DailyReportTag set fun='funYesterday1(A131)+A130',initFun='funYesterday1(A131)' where tag='A131';
update tb_DailyReportTag set fun='funYesterday1(A121)+A120',initFun='funYesterday1(A121)' where tag='A121';

update tb_DailyReportTag set fun='funYesterday1(A132)+A130',initFun='funYesterday1(A132)' where tag='A132';
update tb_DailyReportTag set fun='funYesterday1(A129)+A120',initFun='funYesterday1(A129)' where tag='A129';


update tb_DailyReportTag set fun='funYesterday1(A231)+A230',initFun='funYesterday1(A231)' where tag='A231';
update tb_DailyReportTag set fun='funYesterday1(A221)+A220',initFun='funYesterday1(A221)' where tag='A221';

update tb_DailyReportTag set fun='funYesterday1(A232)+A230',initFun='funYesterday1(A232)' where tag='A232';
update tb_DailyReportTag set fun='funYesterday1(A229)+A220',initFun='funYesterday1(A229)' where tag='A229';

--select * from tb_DailyReportTag where fun like '%funYesterday%'